#ifndef SBNETFILE_H
#define SBNETFILE_H
#include <string>
#include <stdlib.h>
#include <sstream>
#include <map>
#include "lcg_util.h"
#include "gfal_api.h"
#include "libconfig.h++"
#include <fstream>


using namespace std;

class libSbNet {
	private:
		//static data
		static map<string,int> mapHost;
		static bool debugStatus;
		static int maxPing;
		static int pingTimeout;
		static string supProt;

		//variable data	
		string inputLFNString;	
	        map<string,string> mapSrmHost;
	
		//service functions
		string convertInt(int number);
		bool fexists(const char *filename);

		string searchFastStorage();
		string findStoragePing();
		int localCopy(string strSrm, string strDestFile);
		int protAccess(string strProtocol, string strSrm, string& strLocalFile);
		string getDefaultFirst();


	public:
		string sbGetTurl(string inputString);
		int loadCfg();
};


#endif
